package com.small.nacos.api.config.listener;

import java.util.concurrent.Executor;

/**
 * @Author zhoujin
 * @Date 2022/11/24 19:02
 */
public abstract class AbstractSharedListener implements Listener{

    private volatile String dataId;

    private volatile String group;

    public final void fillContext(String dataId, String group) {
        this.dataId = dataId;
        this.group = group;
    }

    @Override
    public Executor getExecutor() {
        return null;
    }

    @Override
    public void receiveConfigInfo(String configInfo) {
        innerReceive(this.dataId,this.group,configInfo);
    }

    public abstract void innerReceive(String dataId, String group, String configInfo);
}
